package lab02.test05;

public class Cube {

    //属性：立方体的长、宽和高

    float length;
    float width;
    float height;

    // 行为：三个变量进行初始化、立方体的体积
    //初始化
    float initialise(float x, float y, float z) {
        length = x;
        width = y;
        height = z;
        return 0;
    }

    //立方体的体积
    float volume() {
        return length * width * height;

    }
}